package edu.java.ishop.model;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

public class User extends Model implements UserDetails {

	private static final long serialVersionUID = 7012189979717778215L;
	private String username;
	private String password;
	
	private Collection<? extends GrantedAuthority> grantedAuthority;
	public User(long id) {
		super(id);
		// TODO Auto-generated constructor stub
	}
	public User() {
		// TODO Auto-generated constructor stub
	}
	public User(String username, String password) {
		super();
		this.username = username;
		this.password = password;
	}
	public User(long id, String username, String password) {
		super(id);
		this.username = username;
		this.password = password;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public Collection<? extends GrantedAuthority> getGrantedAuthority() {
		return grantedAuthority;
	}
	public void setGrantedAuthority(Collection<? extends GrantedAuthority> grantedAuthority) {
		this.grantedAuthority = grantedAuthority;
	}
	@Override
	public Collection<? extends GrantedAuthority> getAuthorities() {
		
		return grantedAuthority;
	}
	@Override
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}
	@Override
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return true;
	}
	@Override
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}
	@Override
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return true;
	}


}
